package strategy;

import java.math.BigDecimal;
import java.util.Map;

/**
 * 满减
 */
public class MJDiscount implements ICouponDiscount<Map<String,String>>{
    /**
     * 满减计算
     *  满n减多少
     * @param info
     * @param skuPrice
     * @return
     */
    @Override
    public BigDecimal amount(Map<String, String> info, BigDecimal skuPrice) {
        return skuPrice.subtract(new BigDecimal(info.get("n")));
    }
}
